package com.joysuch.wwyt.bp.service;

import com.joysuch.wwyt.bp.entity.InspectExceptionAlarmMesage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.joysuch.wwyt.bp.entity.investigate.BpInvestigatePlan;
import com.joysuch.wwyt.bp.entity.investigate.BpInvestigateTask;
import com.joysuch.wwyt.monitoringcenter.bean.McAlarmMessageBean;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zr
 * @since 2021-11-26
 */
public interface InspectExceptionAlarmMesageService extends IService<InspectExceptionAlarmMesage> {
    /**
     * 
     * @param plan 计划
     * @param userId 排查人员
     * @param contentType 异常报警类型
     */
    void saveMessage(Long planId , Long userId ,BpInvestigateTask task, Integer contentType, Long tenentId , String orgCode);

    void saveMessage(Long planId , Long userId , Integer contentType, Long tenentId , String orgCode);

    /**
     *  批量处理报警
     * @param msg
     * @param alarmReason
     * @param handleBy
     * @param handleTime
     */
    void setAllMeaageHandled(String msg, String alarmReason, Long handleBy, Date handleTime);


    List<McAlarmMessageBean> queryInspectException(Integer state,Long tenentId , String orgCode);

    /**
     * 获取时间点到现在的报警信息
     * @param startTime
     * @return
     */
    List<InspectExceptionAlarmMesage> statsForCountInDay(LocalDateTime startTime,Long tenentId, String orgCode);
    
}
